home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
basic
/
iqb9109.zip
/
LPTSTAT.FUN
< prev
next >
Wrap
Text File
|
1991-09-09
|
1KB
|
35 lines
DEFINT A-Z
FUNCTION LptStat% (PrinterNumber%)
' Copyright 1988 MicroHelp, Inc. - All Rights Reserved
' Function: Returns the printer status.
' Input : PrinterNumber% is the printer to test.
' Output : An integer result. If 0, the printer is ready and waiting.
' If non-zero, use BitIsOn% to check for:
' Bit Number Indication
' 7 Busy
' 6 Acknowledge
' 5 Out of paper
' 4 Selected
' 3 I/O error
' 2 Not used
' 1 No printer available
' 0 Time out
DEF SEG = 0
Location = PrinterNumber * 2 + &H406
Address = PEEK(Location) + 256 * PEEK(Location + 1)
IF Address THEN
LptStat = (INP(Address + 1) AND &HF8) XOR 200
ELSE
LptStat = 2 ' No printer available
END IF
DEF SEG
END FUNCTION